package com.ruoyi.bookbus.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户对象 book_user
 * 
 * @author zsq-cj
 * @date 2025-10-21
 */
public class BookUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户ID */
    private Long id;

    /** 用户名 */
    @Excel(name = "用户名")
    private String username;

    /** 密码(加密存储) */
    @Excel(name = "密码(加密存储)")
    private String password;

    /** 真实姓名 */
    @Excel(name = "真实姓名")
    private String name;

    /** 电话 */
    @Excel(name = "电话")
    private String tel;

    /** 头像URL */
    @Excel(name = "头像URL")
    private String avatar;

    /** 角色(0-普通用户,1-管理员) */
    @Excel(name = "角色(0-普通用户,1-管理员)")
    private Integer role;

    /** 信用分 */
    @Excel(name = "信用分")
    private Long credit;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }

    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setTel(String tel) 
    {
        this.tel = tel;
    }

    public String getTel() 
    {
        return tel;
    }

    public void setAvatar(String avatar) 
    {
        this.avatar = avatar;
    }

    public String getAvatar() 
    {
        return avatar;
    }

    public void setRole(Integer role) 
    {
        this.role = role;
    }

    public Integer getRole() 
    {
        return role;
    }

    public void setCredit(Long credit) 
    {
        this.credit = credit;
    }

    public Long getCredit() 
    {
        return credit;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("username", getUsername())
            .append("password", getPassword())
            .append("name", getName())
            .append("tel", getTel())
            .append("avatar", getAvatar())
            .append("role", getRole())
            .append("credit", getCredit())
            .toString();
    }
}
